package com.ww.sound_emission.domain.mqtt;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class MqttData {
    private Cnc cnc;
    private Double durtime;
    @JsonProperty("sensor")
    private Sensor sensor;
    private Long time;

    // Getter 和 Setter 方法


    public Cnc getCnc() {
        return cnc;
    }

    public void setCnc(Cnc cnc) {
        this.cnc = cnc;
    }

    public Double getDurtime() {
        return durtime;
    }

    public void setDurtime(Double durtime) {
        this.durtime = durtime;
    }

    public Sensor getSensor() {
        return sensor;
    }

    public void setSensor(Sensor sensor) {
        this.sensor = sensor;
    }

    public Long getTime() {
        return time;
    }

    public void setTime(Long time) {
        this.time = time;
    }

    @Override
    public String toString() {
        return "MqttData{" +
                "cnc=" + cnc +
                ", durtime=" + durtime +
                ", sensor=" + sensor +
                ", time=" + time +
                '}';
    }
}
